home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / arexx / wac.lha / WAC.Doc < prev    next >
Text File  |  1996-05-10  |  9KB  |  210 lines

  1.                                  WAC
  2.                                  ---
  3.  
  4.                         Version 1.03 - May 1996
  5.  
  6.                   Copyright © Michael Tanzer 1993, 1996
  7.  
  8. +---------------------------------------------------------------------------+
  9. |                             N O T I C E                                   |
  10. |                                                                           |
  11. | Freely distributable.  Not to be used for commercial purposes without     |
  12. | written consent from the author.  Not to be distributed without this      |
  13. | notice and accompanying components intact.                                |
  14. |                                                                           |
  15. | This product is distributed on an 'as-is' basis, with no warranty of any  |
  16. | kind, either express or implied.  No responsibility whatsoever is assumed |
  17. | by the author for the use of this product, nor for any results of its     |
  18. | use.  No claim whatsoever is made as to this product's accuracy, useful-  |
  19. | ness, completeness, nor suitability to any purpose.                       |
  20. |                                                                           |
  21. | Components include the following files:                                   |
  22. |   WAC                                                                     |
  23. |   WAC.info                                                                |
  24. |   WAC.Doc (this document)                                                 |
  25. |   WAC.Doc.info                                                            |
  26. |                                                                           |
  27. +---------------------------------------------------------------------------+
  28.  
  29.  
  30. What's WAC?
  31. -----------
  32.  
  33. WAC ('What?! Another Calendar?!') is a calendar utility written in Rexx.
  34.  
  35.  
  36. Why WAC?
  37. --------
  38.  
  39. WAC is a calendar.  It's not a clock.  It's not a diary.  Just a calendar.
  40. It has virtually no CPU overheads while it is active because the only time
  41. it does anything is when you change the month or year being displayed.
  42.  
  43. WAC can display a single month or (if your screen is large enough) an entire
  44. year.  The mode (month or year) and window positions can be saved so that
  45. the windows will appear wherever you want them when you run WAC.
  46.  
  47. WAC runs asynchronously, so you can run it without tying up a shell.
  48.  
  49. Best of all, WAC is written in Rexx, so if you want to add or change a
  50. feature, you can do it easily.  And it's free.
  51.  
  52.  
  53. What you need in order to use WAC:
  54. ----------------------------------
  55.  
  56. You must have the following libraries in your LIBS: directory:
  57.   rexxsyslib.library    (version 36.17 or later)
  58.   rexxsupport.library   (version 34.9  or later)
  59.   rexxarplib.library    (version  3.0  or later)
  60.   arp.library           (version 39.1  or later)
  61.   screenshare.library   (version  1.46 or later - required only for WB1.3)
  62.  
  63. The RX and WaitForPort commands should be contained in a directory that is
  64. in your default path.  In WB2+ they are in the Rexxc directory.
  65.  
  66.  
  67. How to implement WAC:
  68. ---------------------
  69.  
  70. Copy WAC to your REXX: directory.  If you are running WB2 or later, make
  71. sure the 'script' flag is set.
  72.  
  73. If you want to start WAC with an icon, copy WAC.info to the drawer of your
  74. choice.
  75.  
  76. If you use a large font for screen text, you may find that the window title
  77. overlays part of the window contents.  In this case, try adding 1 or 2 to
  78. the value of the 'blanks' variable at the beginning of the program.
  79.  
  80.  
  81. How to use WAC:
  82. ---------------
  83.  
  84. To run WAC from the Workbench, double-click the WAC icon.
  85.  
  86. To run WAC from a WB2+ shell, enter:
  87.     WAC
  88.  
  89. From a WB1.3 shell, enter:
  90.     RX WAC
  91.  
  92. The WAC window will appear, showing the calendar for the current month with
  93. the current date highlighted.  You can decrement or increment the month
  94. and year by selecting the gadgets on either side of the appropriate string
  95. gadget.  Note that incrementing the month from December to January will
  96. cause the year to be incremented; decrementing the month from January to
  97. December will cause the year to be decremented.
  98.  
  99. You can choose the month by selecting the month string gadget, pressing
  100. right-Amiga-x to clear it, and typing the number, name or abbreviation of
  101. the name of the desired month and pressing the enter key.  Abbreviations
  102. are tested beginning with January, so:
  103.   j    -->    January
  104.   ju   -->    June
  105.   a    -->    April
  106.   au   -->    August
  107.   s    -->    September
  108.   10   -->    October
  109. and so on.  Similarly, you can choose the year by selecting the year string
  110. gadget and entering a new year.  Note that the earliest year that can be
  111. specified is 1900; the latest year is 2099.  Specification of invalid months
  112. or years is ignored.
  113.  
  114. You can select 'Reset' from the menu to return to the current date.  Click
  115. on the close gadget or select 'Quit' from the menu to terminate WAC.
  116.  
  117. If you want to display the entire year, select 'Mode/Year' from the menu.
  118. Note that the window for this mode is 568 pixels wide and 346 pixels high,
  119. so don't try to use it unless your screen is large enough.  (If it isn't,
  120. WAC should safely terminate - but I'm not making any promises!)  Since WB2+
  121. allows you to define a logical screen larger than the physical screen, you
  122. should have plenty of scope to create a screen large enough to contain this
  123. window.  Using an interlaced screen will also provide the required space.
  124.  
  125. The default positions for the WAC windows are in the upper left hand corner
  126. of the screen, but you can change this by dragging the windows to the your
  127. preferred locations (position one window, change modes, then position the
  128. other window), selecting the mode to be used at startup, and selecting
  129. 'Save prefs' from the menu.  The mode and screen positions will be stored
  130. in a configuration file ('S:WAC.config').
  131.  
  132. When WAC is started, it will terminate any already-active WAC display.
  133.  
  134. WAC can be used to determine the date that is a number of days, weeks,
  135. months or years from another date.  The 'current' date can be changed by
  136. entering the day after the month in the month string.  If you clear this
  137. string (e.g. via ctrl-x) you can enter a number preceded by a '+' or a '-'
  138. and followed by 'days', 'weeks', 'months', or 'years'.  For example, to
  139. determine the date which is 26 weeks after 3 April 1995, change the
  140. year to 1995, clear the month and enter 'apr 3', then clear the month
  141. again and enter '+26 weeks'.  'Days' is the default if no other period is
  142. specified, and any period can be abbreviated.
  143.  
  144. Version log:
  145. ------------
  146.  
  147. 1.00  Jan 1992  Original release.
  148. 1.01  Feb 1992  Provided year mode;
  149.                 Allowed mode and window locations to be set and saved;
  150.                 Permitted specification of month by number;
  151.                 Improved icon.
  152. 1.02  Apr 1993  Enabled relative date changes.
  153. 1.03  May 1996  Enabled specification of date in month string;
  154.                 Provided offset for large screen text font.
  155.  
  156.  
  157. Other things you might like to know about WAC:
  158. ----------------------------------------------
  159.  
  160. WAC is coded in such a way that you should find it quite easy to make
  161. adjustments to it.  For example, if you prefer the weeks to begin on Sunday
  162. rather than Monday, you need only to change the variable 'heading' from
  163. 'Mo Tu We Th Fr Sa Su' to 'Su Mo Tu We Th Fr Sa' and change the line
  164. 'return days//7' (which appears after the 'getday:' label near the end of
  165. the program) to 'return (days+1)//7'.
  166.  
  167. Before you make any complicated changes, comment out the paragraph at the
  168. top of the program having the comment 'Run WAC asynchronously' so that you
  169. can insert trace commands, etc. as required, then invoke the test version
  170. from a shell.  It may also be advisable to comment out the 'signal on halt'
  171. and 'trace b' lines that appear at the top of the main control loop.
  172.  
  173. The WAC notify port can be addressed by other Rexx programs, so it is
  174. possible to manipulate the WAC display from another process.  The following
  175. commands are available:
  176.  
  177.   Command       Action
  178.   -------       ------
  179.   QUIT          Terminates the WAC display
  180.   CLOSEWINDOW   Terminates the WAC display
  181.   RESET         Changes to the current date (current day is highlighted)
  182.   MLESS         Decrements the month
  183.   MSTRG month   Changes to the specified month (e.g. MSTRG JUL or MSTRG 7)
  184.   MMORE         Increments the month
  185.   YLESS         Decrements the year
  186.   YSTRG year    Changes to the specified year (e.g. YSTRG 2001)
  187.   YMORE         Increments the year
  188.   MMODE         Changes to month mode
  189.   YMODE         Changes to year mode
  190.   SPREF         Stores mode and window positions in config file
  191.  
  192. The name of the WAC notify port is 'WAC', so by coding:
  193.   address wac 'reset'
  194. you can have your Rexx program reset the WAC display to the current date.
  195.  
  196. You are free use WAC for as long as you like and to modify it in any way
  197. that suits your needs, but please do not distribute a modified version.  I
  198. do not ask for any remuneration, but if you would like to send me anything
  199. I would be delighted to receive it (but please, no more Porsches).  I will
  200. make a sincere effort to answer any questions you may have about WAC.  My
  201. address is:
  202.  
  203.     Michael Tanzer
  204.     P.O. Box 289
  205.     Carlton North VIC 3054
  206.     Australia
  207.  
  208.     Telephone:  +61 3 9387 6589
  209.     Facsimile:  +61 3 9388 1863
  210.